using System.Web.Mvc;
using Home.Site.Models.DataLayer;

namespace Home.Site.Controllers.Admin
{
    [Authorize(Users="admin, derek")]
    public class AdminController : Controller
    {
        private readonly  IPhotoAlbumRepository albumRepository;

        public AdminController(IPhotoAlbumRepository albumRepository) : base()
        {
            this.albumRepository = albumRepository;
        }

        [Authorize(Users = "admin, derek")]
        public ActionResult Index()
        {
            return View();
        }

        [Authorize(Users = "admin, derek")]
        public ActionResult Photos()
        {
            var photoAlbums = albumRepository.GetAlbums();
            return View(photoAlbums);
        }
    }
}

